package banking;

/**
 * @author xbd
 * @create 2021-06-03 8:47
 */
public class Customer {
    private String firstName;
    private String lastName;
    private Account account;
    private Account[] accounts;
    private int numberOfAccounts;
    private SavingAccount savingAccount;
    private CheckingAccount checkingAccount;

    public Customer(String firstName, String lastName) {
        this.firstName = firstName;
        this.lastName = lastName;
        accounts = new Account[5];
    }

    public String getFirstName() {
        return firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;
    }
    public void addAccount(Account account){
        accounts[numberOfAccounts] = account;
        numberOfAccounts++;
    }

    public int getNumOfAccounts(){
        return numberOfAccounts;
    }

    public Account getAccount(int index){
        return accounts[index];
    }

    public SavingAccount getSavings() {
        return savingAccount;
    }

    public void setSavings(SavingAccount savingAccount) {
        this.savingAccount = savingAccount;
    }

    public CheckingAccount getChecking() {
        return checkingAccount;
    }

    public void setChecking(CheckingAccount checkingAccount) {
        this.checkingAccount = checkingAccount;
    }
}
